﻿using Coldairarrow.Business.Company;
using Coldairarrow.Entity.Company;
using Coldairarrow.Util;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Api.Controllers.backstage
{
    [Route("/backstage/[controller]/[action]")]
    public class BKS_CompanyController : BaseApiController
    {
        #region DI

        public BKS_CompanyController(IBTB_CompanyBusiness bTB_CompanyBus)
        {
            _bTB_CompanyBus = bTB_CompanyBus;
        }

        IBTB_CompanyBusiness _bTB_CompanyBus { get; }

        #endregion

        #region 获取
        [HttpPost]
        public async Task<BTB_Company> GetTheData(IdInputDTO input)
        {
            return await _bTB_CompanyBus.GetTheDataAsync(input.id);
        }

        #endregion

        #region 提交

        [HttpPost]
        public async Task UpdateDataAsync(BTB_Company data)
        {
            await _bTB_CompanyBus.UpdateDataAsync(data);
        }


        #endregion
    }
}